package com.shrbank.akka

import akka.actor.{ActorSystem, Props}
import com.typesafe.config.ConfigFactory

/**
  * Created by user on 2016/10/13.
  */
object AkkaClusterMemberSystem {
  def main(args: Array[String]): Unit = {
    val port =2554
    val config = ConfigFactory.parseString("akka.remote.netty.tcp.port=" + port).
      withFallback(ConfigFactory.load("cluster-node.conf"))

    // Create an Akka system
    val system = ActorSystem.create("ClusterSystem", config)
    // Create an actor that handles cluster domain events
    system.actorOf(Props[AkkaClusterMember], name = "clusterMember")
    println("Hello AkkaClusterMember")
  }
}
